package net.tngou.tpage.action;

import java.io.IOException;
import java.util.Map;

import javax.servlet.ServletException;

/**
 * Ai-Ask首页
 * @author tngou@tngou.net
 *
 */
public class IndexAction extends BaseAction {

	@Override
	public void execute() throws ServletException, IOException {
		Map<String, String> map = ststeminfo();
		String status = map.get("status");
		if("0".equals(status))//未安装
		{
			sendRedirect(getDomain()+"");return;
		}
		if("1".equals(status))//私有 内网
		{
			sendRedirect(getDomain()+"login");return;
		}
		if("2".equals(status))//私有 外网
		{
			sendRedirect(getDomain()+"login");return;
		}
		printFreemarker("default/index.ftl", root);
	}
}
